package com.littcore.saap.message.service;

import java.util.List;

import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;

import com.littcore.saap.core.common.SaapConstants.CacheName;
import com.littcore.saap.message.po.UserMessageSub;
import com.littcore.saap.message.vo.UserMessageSubVo;

/**
 * .
 * 
 * <pre><b>描述：</b>
 *    
 * </pre>
 * 
 * <pre><b>修改记录：</b>
 *    
 * </pre>
 * 
 * @author <a href="mailto:littcai@hotmail.com">蔡源</a>
 * @since 2015年11月13日
 * @version 1.0
 */
public interface IUserMessageSubService {

  /**
   * Save or update.
   *
   * @param userId the user id
   * @param tenantId the tenant id
   * @param moduleCode the module code
   * @param messageCode the message code
   * @param channels the channels
   */
  public UserMessageSubVo saveOrUpdate(int userId, int tenantId, String moduleCode, String messageCode, String[] channels);
  
  public UserMessageSubVo saveOrUpdate(int userId, int tenantId, String moduleCode, String messageCode, String channel);
  
  public void saveOrUpdate(int userId, int tenantId);
  
  public void saveOrUpdate(int userId, int tenantId, String moduleCode);

  public UserMessageSub load(int userId, int tenantId, String moduleCode, String messageCode);

  public UserMessageSubVo find(int userId, int tenantId, String moduleCode, String messageCode);

  public List<UserMessageSub> listByUser(int userId, int tenantId);

}